export default {
    hasUserInfo: () => {
        return new Promise((resolve, reject) => {
            wx.getSetting({
                success: res => {
                    if (res.authSetting['scope.userInfo']) {
                        resolve(res);
                    } else {
                        reject(res);
                    }
                },
                fail:(reason)=>{
                    reject(reason);
                }
            });
        });
    }
};
